<?php

$id = $_GET["id"];

//连接
$servername = "localhost";
$username = "root";
$password = "root";
$db = "db5";
 
// 创建连接
$conn = new mysqli($servername, $username, $password,$db);

// 检测连接
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
}

//删除语句
$sql = "DELETE FROM `user` WHERE `user`.`id` = $id";
//执行sql
$conn->query($sql);

?>